#include <QCoreApplication>
#include "cont.h"
void check()
{
    int x, y,height,weight;
    char type;
    Cont a;
    while (true)
    {
        cout << "1 - add 0 -  no\n";
        int i = 0;
        cin >> i;
        if (i == 0)
            break;
        Shape *figure = NULL;
        cout << "Figure C - Circle R - Rectangle S - Square\n";
        cin >> type;
        switch (type)
        {
        case 'C':{cout << "x:"; cin >> x;
                  cout << "y:"; cin >> y;
                  cout << "height:"; cin >> height;
                  figure = new Circle(x, y, height);
                  break;
        }
        case 'R':{cout << "x:"; cin >> x;
                  cout << "y:"; cin >> y;
                  cout << "height:"; cin >> height;
                  cout << "weight:"; cin >> weight;
                  figure = new Rectangle(x, y, height, weight);
                  break;
        }
        case 'S':{cout << "x:"; cin >> x;
                  cout << "y:"; cin >> y;
                  cout << "radius:"; cin >> height;
                  figure = new Square(x, y, height);
                  break;
        }
        default:
            break;
        }
        a.addFigure(figure);
    }
    a.saveFile();
    a.printTypeShapes();
    cin.get();
    cin.get();
}

int main()
{

    check();
    return 0;
}
